import {Injectable} from '@angular/core';
import {BaseHttpService} from '../base-http.service';
import {Observable} from 'rxjs';

export interface MsdsDanger {
  dangerDesc: string;
  msdsEntprId?: number;
  id?: number;
  harmfulEnvironment: string;
  phyCheDanger: string;
  emergentDesc: string;
  harmfulHealth: string;
  gshType: string;
}


@Injectable({
  providedIn: 'root'
})
export class MsdsDangerHttpService {

  constructor(public http: BaseHttpService) {
  }


  /*新增msdsDanger 信息*/
  public addMsdsDanger(param: MsdsDanger): Observable<number> {
    return this.http.post('/msdsDanger', param, {needSuccessInfo: true});
  }

  /*修改msdsDanger信息*/
  public editMsdsDanger(param: MsdsDanger): Observable<void> {
    return this.http.put('/msdsDanger', param, {needSuccessInfo: true});
  }

  /*查询msdsDanger详情*/
  public getMsdsDangerDetail(msdsEntprId: number): Observable<MsdsDanger> {
    return this.http.get('/msdsDanger/' + msdsEntprId);
  }


}
